package cn.nexd.map.location.collector.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * BluetoothDataResult create by codingfish at 15/4/29
 * TODO:
 *
 * @Version V1.0
 */
public class BluetoothDataResult implements Parcelable {

    public BluetoothDataResult() {
    }

    private String id; // scan id
    private String address;//bluetooth address
    private int boundState;//bound state
    private String name;//bluetooth name
    private int type;
    private int rssi;//信号强度
    private String userId;
    private long timestamp;//扫描时间


    public BluetoothDataResult(Parcel source) {
        id = source.readString();
        address = source.readString();
        boundState = source.readInt();
        name = source.readString();
        type = source.readInt();
        rssi = source.readInt();
        userId = source.readString();
        timestamp = source.readLong();
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeString(address);
        dest.writeInt(boundState);
        dest.writeString(name);
        dest.writeInt(type);
        dest.writeInt(rssi);
        dest.writeString(userId);
        dest.writeLong(timestamp);
    }

    public static final Creator<BluetoothDataResult> CREATOR = new Creator<BluetoothDataResult>() {
        @Override
        public BluetoothDataResult createFromParcel(Parcel source) {
            return new BluetoothDataResult(source);
        }

        @Override
        public BluetoothDataResult[] newArray(int size) {
            return new BluetoothDataResult[size];
        }
    };

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getBoundState() {
        return boundState;
    }

    public void setBoundState(int boundState) {
        this.boundState = boundState;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getRssi() {
        return rssi;
    }

    public void setRssi(int rssi) {
        this.rssi = rssi;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
}
